package hcn.protocol.brandnew.feiyong.shoufei;

import hcn.protocol.brandnew.BaseRequest;
import lombok.Data;
import org.atag.sysrouter.annotation.DictionaryMapping;

import javax.xml.bind.annotation.*;
import java.util.List;


/**
 * 门诊预结算信息查询-请求信息 - ODS_04010001
 *
 * @author enjoyLife
 */
@Data
@XmlRootElement(name = "MsgBody")
@XmlAccessorType(XmlAccessType.FIELD)
public class GetPrecalculatedFeeRequest extends BaseRequest {

    /**
     * 就诊医疗机构组织机构代码
     */
    @XmlElement(name = "VisitOrganization")
    private String visitOrganization;
    /**
     * 医院内患者唯一标识
     */
    @XmlElement(name = "SourcePatientId")
    private String sourcePatientId;

    /**
     * 就诊id
     */
    @XmlElement(name = "VisitId")
    private String visitId;

    /**
     * 病人性质
     */
    @XmlElement(name = "PatientProperties")
    private String patientProperties;
    /**
     * 地址全称
     */
    @XmlElement(name = "Address")
    private String address;
    /**
     * 地址-省（自治区、直辖市）
     */
    @XmlElement(name = "Province")
    private String province;
    /**
     * 地址-市（地区、州）
     */
    @XmlElement(name = "City")
    private String city;
    /**
     * 地址-县（区）
     */
    @XmlElement(name = "County")
    private String county;
    /**
     * 地址-乡（镇、街道办事处）
     */
    @XmlElement(name = "Town")
    private String town;
    /**
     * 收货人姓名
     */
    @XmlElement(name = "ReciverName")
    private String reciverName;
    /**
     * 收货人手机号
     */
    @XmlElement(name = "ReciverPhone")
    private String reciverPhone;
    /**
     * 代煎标志
     */
    @XmlElement(name = "BoilSign")
    private Byte boilSign;
    /**
     * 代煎费用
     */
    @XmlElement(name = "BoilFee")
    private String boilFee;
    /**
     * 取药方式
     */
    @XmlElement(name = "TakeWay")
    private Byte takeWay;
    /**
     * 快递费用
     */
    @XmlElement(name = "ExpressFee")
    private String expressFee;
    /**
     * 总计金额
     */
    @XmlElement(name = "TotalCost")
    private String totalCost;
    /**
     * 收费单据集合
     */
    @XmlElementWrapper(name = "FeeRecordLists")
    @XmlElement(name = "FeeRecordList")
    private List<FeeRecordList> feeRecordLists;

    /**
     * 抵用券id集合，2系Phis使用
     */
    @XmlElementWrapper(name = "VoucherIdList")
    @XmlElement(name = "VoucherId")
    private List<String> voucherIdList;

    /**
     * 抵用券集合，4系Phis使用
     */
    @XmlElementWrapper(name = "VoucherIdList")
    @XmlElement(name = "VoucherId")
    private List<Voucher> voucherList;

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Voucher{
        /**
         * 抵用券对应的收费项目id
         */
        private String voucherItemId;
        /**
         * 抵用券id
         */
        private String voucherId;
    }

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class FeeRecordList {

        /**
         * 收费单据标识
         */
        @XmlElement(name = "FeeNo")
        private String feeNo;
        /**
         * 类型代码
         */
        @XmlElement(name = "FeeTypeCode")
        @DictionaryMapping(id = "hcn.base.dictionary.HCN_feeType")
        private String feeTypeCode;
        /**
         * 类型名称
         */
        @XmlElement(name = "FeeTypeName")
        private String feeTypeName;
    }

}
